package com.zbkj.crmeb.store.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zbkj.crmeb.store.model.StoreProduct;
import com.zbkj.crmeb.store.model.StoreProductActive;
import com.zbkj.crmeb.store.response.StoreSaleAnalysisResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 销售分析
 * @Description: 
 * @author duyb
 * @date 2022-10-12
 */
@Mapper
public interface StoreSaleAnalysisDao extends BaseMapper<StoreProductActive> {

    Map getInfoByDate(@Param("merId")Integer merId, String startTime, String endTime);
    Map getProductByDate(@Param("merId")Integer merId, String startTime, String endTime);
    List<Integer> getProductIdByDate(@Param("merId")Integer merId, String startTime, String endTime);

    List<StoreSaleAnalysisResponse> getProductDetail(Integer merId, Date startTime, Date endTime);

    void removeDownProduct(Integer merId, @Param("ew")LambdaQueryWrapper<StoreProduct> lambdaQueryWrapper);
}
